{template '../header'}

<div>
    用户登录
</div>
<form method="post">
    <div>
        <label>用户名</label>
        <input type="text" name="username" placeholder="用户名" />
    </div>
    <div>
        <label>密码</label>
        <input type="password" name="password" placeholder="登录密码" />
    </div>
    <div>
        <label>验证码</label>
        <div>
            <input type="text" autocomplete="off" id="captcha_code" name="captcha_code" placeholder="验证码">
            <div>
                <script type="text/javascript">
                    function reDrawValidateImage(e, url) {
                        var r = Math.random();
                        if (url) {
                            e.src = url + '?' + r;
                        } else {
                            e.src = "/code/index?" + r;
                        }
                    }
                </script>
                <img src="/code/index" style="height: calc(1.5em + .5rem + 6px);" onclick="reDrawValidateImage(this, '{:$this->createUrl('code')}')" />
            </div>
        </div>
    </div>
    <div>
        <button type="submit" name="do" value="login">登陆</button>
    </div>
</form>
<div>
    <a href="/login/recover">找回密码</a>
    <div>
        <span>没有账户？</span><a href="/login/reg">立即注册</a>
    </div>
</div>

{template '../footer'}